<?php foreach ($list_tag as $row_tg) {$id_m_th_ajaran = $row_tg->id_m_th_ajaran;$bulan = $row_tg->bulan;}?>
<table class="table table-condensed">
  <thead>
	<tr>
		<th width="30">#</th>
		<th width="80">NIT</th>
		<th>Nama Lengkap</th>
		<th>Jenis Kelamin</th>
		<th>Kelas</th>
		<th>Subsidi</th>
		<th width="123">Besar Subsidi</th>
		<th width="123">Sisa Tagihan</th>
		<th></th>
	</tr>
  </thead>
  <tbody>
	<?php 
		if(count($list)>0){
			$i = 1; 
			foreach ($list as $row) {
	?>
	<tr class="hover">
		<td><?php echo $i++ ?></td>
		<td><?php echo $row->id_m_tholabah; ?></td> 
		<td><?php echo $row->nama_lengkap; ?></td> 
		<td><?php echo $row->jk; ?></td>
		<td><?php echo $row->kelas; ?></td>
		<td><?php echo $row->nama_subsidi; ?></td>
		<td><?php echo formatRupiahTabel($row->besar_subsidi); ?></td>
		<td><?php echo formatRupiahTabel($row->sisa_tagihan); ?></td>
		<td>
			<?php if($id_m_th_ajaran == id_ta_aktif()){?>
			<a class="editorLink pull-right" data-reveal-id="delModal" nama="<?php echo $row->nama_lengkap; ?>" 2nd="<?php echo $row->kelas; ?>" 3rd="<?php echo $row->nama_subsidi; ?>" 4th="<?php echo $bulan;?>" 5th="<?php echo formatRupiah($row->besar_subsidi); ?>" hpid="<?php echo $row->id_b_sub_sy;?>" data-reveal><span class="glyphicon glyphicon-floppy-remove"></span></a>
			<?php } ?>
		</td>
	</tr>
	<?php
			}
		}else{
	?>
	<tr>
		<td colspan="9"><center>Belum ada tholabah Maddin <?php foreach ($list_tag as $row_tg) {echo $row_tg->j_pendidikan;?> yang tersubsidi pada bulan <?php echo $row_tg->bulan.' '.$row_tg->th_ajaran;}?></center></td>
	</tr>
	<?php
		}
	?>
  </tbody>
</table>